package com.landinfo.repository;

import com.landinfo.domain.SampleLineMonitor;
import org.springframework.stereotype.Repository;

import org.springframework.data.jpa.repository.*;

import java.util.List;


/**
 * Spring Data JPA repository for the SampleLineMonitor entity.
 */
@SuppressWarnings("unused")
@Repository
public interface SampleLineMonitorRepository extends JpaRepository<SampleLineMonitor,Long> {
    SampleLineMonitor findOneById(Long id);

//    @Query("select line from SampleLineMonitor line where ?1 in (line.monitorPersons)")
    @Query("select line from SampleLineMonitor line where line.monitorPersons like ?1")
    List<SampleLineMonitor> queryAllByUser(String userName);
}
